-- GENERATED SPELL FOR [Umbrafen Witchdoctor] --


function spell0_20115(pUnit, Event) --@Shrink,n/a--
pUnit:FullCastSpellOnTarget(7289,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20115', 3000, 1)
end

function spell1_20115(pUnit, Event) --@Terror Totem,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(35197,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_20115', 1, 1)
end

function spell2_20115(pUnit, Event) --@Umbrafen Buff,n/a--
pUnit:FullCastSpellOnTarget(34871,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20115', 2000, 1)
end

function Sorts_20115(pUnit, Event)
local choix_sorts_20115 = math.random(0, 2)
if choix_sorts_20115 == 0 then
pUnit:RegisterEvent('spell0_20115', 1, 1)
end
if choix_sorts_20115 == 1 then
pUnit:RegisterEvent('spell1_20115', 1, 1)
end
if choix_sorts_20115 == 2 then
pUnit:RegisterEvent('spell2_20115', 1, 1)
end
end

function mob20115_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20115', math.random(1500, 3000), 1)
end

function mob20115_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20115_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20115_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20115, 1, 'mob20115_Action')
RegisterUnitEvent(20115, 2, 'mob20115_Leave')
RegisterUnitEvent(20115, 3, 'mob20115_Kill')
RegisterUnitEvent(20115, 4, 'mob20115_Die')
